<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<head>
		<div th:replace="fragment/front/meta"></div>
        <title th:utext="${application.siteName}"></title>
        <div th:replace="fragment/front/css"></div>
        <link rel="stylesheet" type="text/css" th:href="@{/statics/page/css/front/index/index.css}" />
	</head>
	<body>
		<div th:replace="fragment/front/nav"></div>
		
		<div class="site-container">
		</div>
		
		<div th:replace="fragment/front/footer"></div>
        <div th:replace="fragment/front/script"></div>
        
        <script>
        	function uploadFile() {
        		var file_obj = document.getElementById('fafafa').files[0];

                var fd = new FormData();
                fd.append('upfile', file_obj);

                $.ajax({
                    url: ctx + 'file/multi.html',
                    type:'POST',
                    data:fd,
                    processData:false,  //tell jQuery not to process the data
                    contentType: false,  //tell jQuery not to set contentType
                    dataType: 'json',
                    //这儿的三个参数其实就是XMLHttpRequest里面带的信息。
                    success:function (data) {
                    	for(var i = 0; i < data.length; i++) {
                    		$("#urls").append("<a href=" + data[i] + ">下载</a>");
                    	}
                    }
                })
        	}
        </script>
    </body>
</html>